﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace GUI_Web
{
    public partial class ConfEvento : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnConfirmar_Click(object sender, EventArgs e)
        {
            bool anySelected = chxEv1.Checked || chxEv2.Checked;
            
            if (anySelected)
            {
                if (chxEv1.Checked)
                {
                    tabelaConfirm.Rows.Add(ev1);
                    chxEv1.Visible = false;
                }
                if (chxEv2.Checked)
                {
                    tabelaConfirm.Rows.Add(ev2);
                    chxEv2.Visible = false;
                }
            }
        }

        protected void btnCancelar_Click(object sender, EventArgs e)
        {
            bool anySelected = chxEv1.Checked || chxEv2.Checked;

            if (anySelected)
            {
                if (chxEv1.Checked)
                {
                    tabelaCancel.Rows.Add(ev1);
                    chxEv1.Visible = false;
                }
                if (chxEv2.Checked)
                {
                    tabelaCancel.Rows.Add(ev2);
                    chxEv2.Visible = false;
                }
            }
        }
    }
}